<h1>Bill of Lading Document</h1>
<?php 
    if($billoflading){$data = $billoflading['data'];$lineitems = $billoflading['lineitem'];?>
<fieldset>
<legend>Data</legend>
<table>
    <tr>
        <td><label>Creation Date</label></td>
        <td><label><?php echo $data->CreationDate;?></label></td>
        <td>No Bill of Lading</td>
        <td><label><?php echo $data->BLNumber;?></label></td>
    </tr>
    <tr>
        <td>Shipper</td>
        <td><label><?php echo $data->SLName;?></label></td>
        <td>Consignee</td>
        <td><label><?php echo $data->CName;?></label></td>
    </tr>
    <tr>
        <td></td>
        <td><label><?php echo $data->SLAddress;?></label></td>
        <td></td>
        <td><label><?php echo $data->CAddress;?></label></td>
    </tr>
    <tr>
        <td></td>
        <td><label><?php echo $data->SLTelp;?></label></td>
        <td></td>
        <td><label><?php echo $data->CTelp;?></label></td>
    </tr>
    <tr>
        <td>Notify Party</td>
        <td><label><?php echo $data->NPName;?></label></td>
        <td>Forwarder</td>
        <td><label><?php echo $data->FName;?></label></td>
    </tr>
    <tr>
        <td></td>
        <td><label><?php echo $data->NPAddress;?></label></td>
        <td></td>
        <td><label><?php echo $data->FAddress;?></label></td>
    </tr>
    <tr>
        <td></td>
        <td><label><?php echo $data->NPTelp;?></label></td>
        <td></td>
        <td><label><?php echo $data->FTelp;?></label></td>
    </tr>
    <tr>
        <td>Precarriage</td>
        <td><label><?php echo $data->Precarriage;?></label></td>
        <td>Place of Receipt</td>
        <td><label><?php echo $data->PlaceOfReceipt;?></label></td>
    </tr>
    <tr>
        <td>Vessel</td>
        <td><label><?php echo $data->Vessel;?></label></td>
        <td>Port of Loading</td>
        <td><label><?php echo $data->PortOfLoading;?></label></td>
    </tr>
    <tr>
        <td>Port of Discharge</td>
        <td><label><?php echo $data->PortOfDischarge;?></label></td>
        <td>Place of Delivery</td>
        <td><label><?php echo $data->PlaceOfDelivery;?></label></td>
    </tr>
    <tr>
        <td>Delivery Agent</td>
        <td><label><?php echo $data->DAName;?></label></td>
        <td>Freight Charges</td>
        <td><label><?php echo $data->FreightCharges;?></label></td>
    </tr>
    <tr>
        <td></td>
        <td><label><?php echo $data->DAAddress;?></label></td>
        <td>Revenue Tons</td>
        <td><label><?php echo $data->RevenueTons;?></label></td>
    </tr>
    <tr>
        <td></td>
        <td><label><?php echo $data->DATelp;?></label></td>
        <td>Prepaid</td>
        <td><label><?php echo $data->Prepaid;?></label></td>
    </tr>
    <tr>
        <td>Collect</td>
        <td><label><?php echo $data->Collect;?></label></td>
        <td>Exchange Rate</td>
        <td><label><?php echo $data->ExchangeRate;?></label></td>
    </tr>
    <tr>
        <td>PrepaidAt</td>
        <td><label><?php echo $data->PrepaidAt;?></label></td>
        <td>PayableAt</td>
        <td><label><?php echo $data->PayableAt;?></label></td>
    </tr>
    <tr>
        <td>Place Of Issue</td>
        <td><label><?php echo $data->PlaceOfIssue;?></label></td>
        <td>Date Of Issue</td>
        <td><label><?php echo $data->DateOfIssue;?></label></td>
    </tr>
    <tr>
        <td>No Of Original Bill</td>
        <td><label><?php echo $data->NoOfOriginalBill;?></label></td>
        <td></td>
        <td></td>
    </tr>
</table>
</fieldset>
<fieldset>
<legend>Container</legend>
    <table>
        <tr>
            <td>Container No</td>
            <td>Kind Package</td>
            <td>Gross Weight</td>
            <td>Nett Weight</td>
            <td>Measurement</td>
            <td>Detail</td>
            <td>Total Package</td>
        </tr>
        <?php foreach($lineitems as $lineitem){ 
            $containerdetails = $lineitem->ContainerDetail?>
        <tr>
            <td><?php echo $lineitem->ContainerNo;?></td>
            <td><?php echo $lineitem->KindPackage;?></td>
            <td><?php echo $lineitem->GrossWeight;?></td>
            <td><?php echo $lineitem->NettWeight;?></td>
            <td><?php echo $lineitem->Measurement;?></td>
            <td>
               <?php foreach($containerdetails as $containerdetail){
                   echo $containerdetail->QuantityPackage. ' '.$containerdetail->Description;
                   echo '</br>';
               }?>
            </td>
            <td><?php echo $lineitem->TotalPackage;?></td>
        </tr>
        <?php } ?>
    </table>
</fieldset>
<br/>
<?php } ?>